package ar.com.spsolutions.splilabrary.view.application.configuration;

import ar.com.spsolutions.splibrary.services.AuthorService;
import ar.com.spsolutions.splibrary.services.EntityService;
import ar.com.spsolutions.splibrary.services.RoleService;
import ar.com.spsolutions.splibrary.services.UserService;
import ar.com.spsolutions.splilabrary.view.application.SPApplication;

public class ModelConfigurator extends Configurator {

	public ModelConfigurator(final SPApplication application) {
		super(application);
	}

	@Override
	protected void initialize(final SPApplication app) {
		final EntityService generalService = app.getGeneralService();
		final AuthorService authorService = generalService.getAuthorService();
		final RoleService roleService = generalService.getRoleService();
		final UserService userService = generalService.getUserService();
		app.getDataBasePopulator().populate(app.getNotifier(), userService,
				roleService, generalService, authorService);

	}

}
